import Vue from "vue";
import Router from "vue-router";
import Home from "./views/Home.vue";

Vue.use(Router);

export default new Router({
  routes: [
    {
      path: "/",
      redirect: "/home"
    },
    {
      path: "/home",
      name: "home",
      component: Home,
      meta: {
        title: "首页",
        isTopNab: true,
        isBtnNav: true
      },
      children: [
     
      ]
    },
    {
      path: "/buy",
      name: "buy",
      component: () => import("./views/Buy.vue"),
      meta: {
        title: "购票",
        isTopNab: true,
        isBtnNav: true
      }
    },
    {
      path: "/shop",
      name: "shop",
      component: () => import("./views/Shop.vue"),
      meta: {
        title: "商城",
        isTopNab: true,
        isBtnNav: true
      }
    },
    {
      path: "/find",
      name: "find",
      component: () => import("./views/Find.vue"),
      meta: {
        title: "发现",
        isTopNab: true,
        isBtnNav: true
      }
    },
    {
      path: "/login",
      name: "login",
      component: () => import("./views/Login.vue"),
      meta: {
        title: "登录",
        isTopNab: false,
        isBtnNav: false
      }
    },
    {
      path:'/movieDetail/:id',
      name:'movieDetail',
      component:()=>import('./views/movieDetails/movieDetail.vue'),
      meta:{
        title:'电影详情',
        isTopNab:false,
        isBtnNav:false
      }
    },
    {
      path:'/movieNesw/:id',
      name:'movieNesw',
      component:()=>import('./views/movieDetails/newsDetail.vue'),
      meta:{
        title:'新闻详情',
        isTopNab:false,
        isBtnNav:false
      }
    },
    {
      path: "/404",
      name: "404",
      component: () => import("./views/404.vue"),
      meta: {
        title: "404",
        isTopNab: false,
        isBtnNav: false
      }
    },
    {
      path: "/city",
      name: "city",
      component: () => import("./views/city.vue"),
      meta: {
        title: "城市选择",
        isTopNab: false,
        isBtnNav: false
      }
    },
    {
      path: "/address",
      name: "address",
      component: () => import("./views/address.vue"),
      meta: {
        title: "城市选择",
        isTopNab: false,
        isBtnNav: false
      }
    }
  ]
});
